package hu.rsc.forbiddenwords.client;

import hu.rsc.forbiddenwords.shared.ApplicationDTO;
import hu.rsc.forbiddenwords.shared.ColumnFilterList;
import hu.rsc.forbiddenwords.shared.EntryDTO;
import hu.rsc.forbiddenwords.shared.LanguageDTO;

import java.util.List;

import com.google.gwt.gen2.table.client.TableModelHelper.Request;
import com.google.gwt.gen2.table.client.TableModelHelper.Response;
import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;

/**
 * The client side stub for the RPC service.
 */
@RemoteServiceRelativePath("service")
public interface ForbiddenWordsService extends RemoteService {
    String filter(String name) throws IllegalArgumentException;

    int getApplicationCount(ColumnFilterList filters);

    Response<ApplicationDTO> getApplications(Request request);

    Response<EntryDTO> getEntries(Long application, Request request, ColumnFilterList filters);

    int getEntriesCount(Long application, ColumnFilterList filters);

    int getLanguageCount(ColumnFilterList filters);

    List<LanguageDTO> getLanguages();

    Response<LanguageDTO> getLanguages(Request request);

    ApplicationDTO saveApplication(ApplicationDTO app);

    EntryDTO saveEntry(EntryDTO entry);

    LanguageDTO saveLanguage(LanguageDTO lang);
}
